<template>
  <div
    class="fault-container"
    v-loading="loading"
    element-loading-text="Loading..."
    element-loading-svg-view-box="-10, -10, 50, 50"
    element-loading-background="rgba(255 , 255 , 255, 0.55)"
  >
    <el-row>
      <el-col :span="24">
        <!-- 台区显示内容 -->
        <div class="station-area">
          <div class="station-area-item" v-for="item in stationArea">
            <p class="item1">
              <span v-if="item.state">
                {{ item.pname }}
              </span>
            </p>
            <p class="item2">
              {{ item.label }}
            </p>
            <p class="item3">
              <img v-if="item.state" src="@/assets/images/station-area1.png" />
              <img v-else src="@/assets/images/station-area2.png" />
            </p>
            <p class="item2">{{ item.name }}</p>
          </div>
        </div>
      </el-col>
    </el-row>
    <el-row>
      <el-col :span="24">
        <el-tabs type="border-card" v-model="activeName1">
          <el-tab-pane name="1" label="设置界面" class="fault-w">
            <el-tabs
              v-if="activeName1 === '1'"
              type="border-card"
              v-model="activeName"
              class="border-card"
            >
              <el-tab-pane label="组织结构设置" name="1">
                <el-row v-if="activeName === '1'">
                  <el-col :span="21">
                    <!-- 组织结构设置 -->
                    <OrganStructure :loading="loading"></OrganStructure>
                  </el-col>
                  <el-col :span="3">
                    <div class="os-item">
                      <el-button @click="readTabAddr">读取当前表地址</el-button>
                      <el-button @click="readAllTabAddr"
                        >读取全部表地址</el-button
                      >
                      <el-button @click="saveCurrentData">保存</el-button>
                      <el-button @click="sendAllTabs">发送所有表位</el-button>
                      <el-button @click="sendTabs">发送当前表位</el-button>
                    </div>
                    <div class="os-item">
                      <el-button @click="newScheme">新建方案</el-button>
                      <el-button @click="loadScheme">载入方案</el-button>
                      <el-button @click="saveScheme">另存方案</el-button>
                    </div>
                  </el-col>
                </el-row>
              </el-tab-pane>
              <el-tab-pane label="功率源" name="2">
                <!-- 功率源 -->
                <PowerSource v-if="activeName === '2'"></PowerSource>
              </el-tab-pane>
              <el-tab-pane label="线损设置" name="3">
                <LineLoss v-if="activeName === '3'"></LineLoss>
              </el-tab-pane>
              <el-tab-pane label="表位故障设置" name="4">
                <EpitopeFault v-if="activeName === '4'"></EpitopeFault>
              </el-tab-pane>
              <el-tab-pane label="计时器" name="5">
                <Timer v-if="activeName === '5'"></Timer>
              </el-tab-pane>
              <el-tab-pane label="表位信息设置" name="6">
                <EpitopeInformation
                  v-if="activeName === '6'"
                ></EpitopeInformation>
              </el-tab-pane>
              <el-tab-pane label="抄读表数据" name="7">
                <div class="rmd-content" v-if="activeName === '7'">
                  <div class="rmd-item1">
                    <ReadingMeter
                      :etableData="etableData"
                      :maxtableData="maxtableData"
                      :vatableData="vatableData"
                      :paramtableData="paramtableData"
                      @selectData="selectData"
                      :percentage1="percentage1"
                      :percentage2="percentage2"
                      :percentage3="percentage3"
                      :percentage4="percentage4"
                      :percentageFlag1="percentageFlag1"
                      :percentageFlag2="percentageFlag2"
                      :percentageFlag3="percentageFlag3"
                      :percentageFlag4="percentageFlag4"
                    ></ReadingMeter>
                  </div>
                  <div class="rmd-item2">
                    <fieldset>
                      <legend>抄读数据:</legend>
                      <div class="rmd-item2-1">
                        <el-radio-group
                          class="rmd-item2-11"
                          v-model="readRadio"
                        >
                          <el-radio label="1">选中数据</el-radio>
                          <el-radio label="2">当前表数据</el-radio>
                          <el-radio label="3">所有表数据</el-radio>
                        </el-radio-group>
                        <el-button class="rmd-btn-margin" @click="readTabData"
                          >读取数据</el-button
                        >
                      </div>
                    </fieldset>

                    <fieldset
                      v-if="
                        currentActiveName === '1' || currentActiveName === '2'
                      "
                    >
                      <legend>写入数据:</legend>
                      <div class="rmd-item2-1">
                        <el-radio-group
                          class="rmd-item2-11"
                          v-model="writeRadio"
                        >
                          <el-radio label="1">选中数据</el-radio>
                          <el-radio label="2">当前表数据</el-radio>
                          <el-radio label="3">所有表数据</el-radio>
                        </el-radio-group>
                        <el-button class="rmd-btn-margin" @click="writeTabData"
                          >写入数据</el-button
                        >
                      </div>
                    </fieldset>
                    <div
                      style="
                        display: flex;
                        justify-content: center;
                        margin-top: 10px;
                      "
                    >
                      <el-button @click="cancelData">取消</el-button>
                    </div>
                  </div>
                </div>
              </el-tab-pane>
              <el-tab-pane label="题库" name="8">
                <div class="tiku-content" v-if="activeName === '8'">
                  <TiKu></TiKu>
                </div>
              </el-tab-pane>
            </el-tabs>
          </el-tab-pane>
          <el-tab-pane name="2" label="考生界面" class="fault-w">
            <eleCategory v-if="activeName1 === '2'"></eleCategory>
          </el-tab-pane>
        </el-tabs>
      </el-col>
      <!-- <el-col :span="6">
        <fieldset>
          <legend>故障列表:</legend>
          <div>111</div>
        </fieldset>
      </el-col> -->
    </el-row>
    <!-- 载入方案 -->
    <LoadSchemeForm
      @is-show="close"
      ref="loadSchemeFormRef"
      :loadSchemeFormVisible="loadSchemeFormVisible"
    ></LoadSchemeForm>
    <!-- 另存方案 -->
    <SchemeForm
      @is-show="close"
      :schemeFormVisible="schemeFormVisible"
    ></SchemeForm>
    <!-- 输入密码 -->
    <el-dialog
      v-model="pwdVisible"
      title="密码输入"
      width="500"
      :before-close="handleClosePwd"
    >
      <div>
        <el-form
          ref="ruleFormRef"
          style="max-width: 600px"
          :model="ruleForm"
          status-icon
          :rules="rules"
          label-width="auto"
          class="demo-ruleForm"
        >
          <el-form-item label="密码" prop="pass" style="margin-bottom: 20px">
            <el-input
              v-model="ruleForm.pass"
              type="password"
              show-password
              autocomplete="off"
            />
          </el-form-item>
        </el-form>
      </div>
      <template #footer>
        <div class="dialog-footer">
          <el-button @click="resetForm(ruleFormRef)">重置</el-button>
          <el-button type="primary" @click="submitForm(ruleFormRef)">
            确定
          </el-button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>
<script setup>
import { ref, provide, reactive, watch, onMounted, nextTick } from "vue";
import { ElMessage, ElMessageBox } from "element-plus";
import { useAppStore, paramsDataStore } from "@/stores";
import OrganStructure from "./components/organStructure.vue";
import PowerSource from "./components/powerSource.vue";
import LineLoss from "./components/lineLoss.vue";
import EpitopeFault from "./components/epitopeFault.vue";
import EpitopeInformation from "./components/epitopeInformation.vue";
import Timer from "./components/timer.vue";
import TiKu from "./components/tiku.vue";
import ReadingMeter from "./components/readingMeter.vue";
import eleCategory from "@/components/eleCategory/index.vue";
import SchemeForm from "@/components/dialog/schemeForm.vue";
import LoadSchemeForm from "@/components/dialog/loadSchemeForm.vue";

import { storeToRefs } from "pinia";
import { meterPositionListTree, meterPositionList } from "@/api/app.js";
import {
  meterReadMeterAddr,
  meterPositionPlanUpdate,
  commLcd,
  commSendMeterState,
  commSendVoltage,
  meterMeterDataCollection,
  userCheckPassword,
  userSelectState,
} from "@/api/source.js";
const useApp = useAppStore();
let {
  monthMeterReading,
  currentAccountingData,
  receivedData,
  tableFault,
  tableStudent,
  calculationData,
  organStructure,
  tableHeader,
  currentPlanId,
  tempData,
  loading,
} = storeToRefs(useApp);
const paramsData = paramsDataStore();
let { stationArea, stationData, newStationArea } = storeToRefs(paramsData);

const ruleForm = reactive({
  pass: "",
  // checkPass: "",
});
const ruleFormRef = ref();
const rules = reactive({
  pass: [{ required: true, message: "请输入密码", trigger: "blur" }],
  // checkPass: [{ required: true, message: "请输入确认密码", trigger: "blur" }],
});
const radio = ref("1");
const pwdVisible = ref(false);
const schemeFormVisible = ref(false);
const loadSchemeFormVisible = ref(false);
const loadSchemeFormRef = ref();
const activeName = ref("1");
const activeName1 = ref("1");
const currentActiveName = ref("1");
const readRadio = ref("1");
const writeRadio = ref("1");
const cellData = ref();
const position = ref("");
const multipleSelection = ref([]);
const loadingRef = ref(false);
const wgCount = ref(0);
provide("loadingRef", loadingRef);
const disabledArr = [
  "zhygzdn",
  "byzxygz",
  "byfxygfl",
  "zhwg1zdn",
  "zhwg2zdn",
  "syzxygfl",
  "syfxygfl",
  "syzhwg1zdn",
  "syzhwg2zdn",
];
const etableData = ref([
  {
    prop: "zhygzdn",
    parm0: "readCombinedActiveEnergy",
    parm01: "writeCombinedActiveEnergy",
    parm1: 0,
    parm2: 0,
    parm3: "",
    label: "当前组合有功总电能",
    content: "",
    type: "1",
  },
  {
    prop: "byzxygfl1",
    parm0: "readPositiveActiveEnergy",
    parm01: "writePositiveActiveEnergy",
    parm1: 1,
    parm2: 0,
    parm3: "",
    label: "当前正向有功尖电能",
    content: "",
  },
  {
    prop: "byzxygfl2",
    parm0: "readPositiveActiveEnergy",
    parm01: "writePositiveActiveEnergy",
    parm1: 2,
    parm2: 0,
    parm3: "",
    label: "当前正向有功峰电能",
    content: "",
  },
  {
    prop: "byzxygfl3",
    parm0: "readPositiveActiveEnergy",
    parm01: "writePositiveActiveEnergy",
    parm1: 3,
    parm2: 0,
    parm3: "",
    label: "当前正向有功平电能",
    content: "",
  },
  {
    prop: "byzxygfl4",
    parm0: "readPositiveActiveEnergy",
    parm01: "writePositiveActiveEnergy",
    parm1: 4,
    parm2: 0,
    parm3: "",
    label: "当前正向有功谷电能",
    content: "",
  },
  {
    prop: "byzxygfl5",
    parm0: "readPositiveActiveEnergy",
    parm01: "writePositiveActiveEnergy",
    parm1: 5,
    parm2: 0,
    parm3: "",
    label: "当前正向有功深谷电能",
    content: "",
  },
  {
    prop: "byzxygz",
    parm0: "readPositiveActiveEnergy",
    parm01: "writePositiveActiveEnergy",
    parm1: 0,
    parm2: 0,
    parm3: "",
    label: "当前正向有功总电能",
    content: "",
    type: "1",
  },
  {
    prop: "byfxygfl1",
    label: "当前反向有功尖电能",
    parm0: "readReverseActiveEnergy",
    parm01: "writeReverseActiveEnergy",
    parm1: 1,
    parm2: 0,
    parm3: "",
    content: "",
  },
  {
    prop: "byfxygfl2",
    label: "当前反向有功峰电能",
    parm0: "readReverseActiveEnergy",
    parm01: "writeReverseActiveEnergy",
    parm1: 2,
    parm2: 0,
    parm3: "",
    content: "",
  },
  {
    prop: "byfxygfl3",
    label: "当前反向有功平电能",
    parm0: "readReverseActiveEnergy",
    parm01: "writeReverseActiveEnergy",
    parm1: 3,
    parm2: 0,
    parm3: "",
    content: "",
  },
  {
    prop: "byfxygfl4",
    label: "当前反向有功谷电能",
    parm0: "readReverseActiveEnergy",
    parm01: "writeReverseActiveEnergy",
    parm1: 4,
    parm2: 0,
    parm3: "",
    content: "",
  },
  {
    prop: "byfxygfl5",
    label: "当前反向有功深谷电能",
    parm0: "readReverseActiveEnergy",
    parm01: "writeReverseActiveEnergy",
    parm1: 5,
    parm2: 0,
    parm3: "",
    content: "",
  },
  {
    prop: "byfxygfl",
    label: "当前反向有功总电能",
    parm0: "readReverseActiveEnergy",
    parm01: "writeReverseActiveEnergy",
    parm1: 0,
    parm2: 0,
    parm3: "",
    content: "",
    type: "1",
  },
  {
    prop: "zhwg1zdn",
    label: "当前组合无功1总电能",
    parm0: "readCombinedReactivePower1ElectricEnergy",
    parm01: "writeCombinedReactivePower1ElectricEnergy",
    parm1: 0,
    parm2: 0,
    parm3: "",
    content: "",
    type: "1",
  },
  {
    prop: "zhwg2zdn",
    parm0: "readCombinedReactivePower2ElectricEnergy",
    parm01: "writeCombinedReactivePower2ElectricEnergy",
    parm1: 0,
    parm2: 0,
    parm3: "",
    label: "当前组合无功2总电能",
    content: "",
    type: "1",
  },
  {
    prop: "d1xxwgzdn",
    label: "当前一象限无功总电能",
    parm0: "readFirstQuadrantReactiveEnergy",
    parm01: "writeFirstQuadrantReactiveEnergy",
    parm1: 0,
    parm2: 0,
    parm3: "",
    content: "",
    type: "1",
  },
  {
    prop: "d2xxwgzdn",
    label: "当前二象限无功总电能",
    parm0: "readSecondQuadrantReactiveEnergy",
    parm01: "writeSecondQuadrantReactiveEnergy",
    parm1: 0,
    parm2: 0,
    parm3: "",
    content: "",
    type: "1",
  },
  {
    prop: "d3xxwgzdn",
    label: "当前三象限无功总电能",
    parm0: "readThirdQuadrantReactiveEnergy",
    parm01: "writeThirdQuadrantReactiveEnergy",
    parm1: 0,
    parm2: 0,
    parm3: "",
    content: "",
    type: "1",
  },
  {
    prop: "d4xxwgzdn",
    label: "当前四象限无功总电能",
    parm0: "readFourthQuadrantReactiveEnergy",
    parm01: "writeFourthQuadrantReactiveEnergy",
    parm1: 0,
    parm2: 0,
    parm3: "",
    content: "",
    type: "1",
  },
  {
    prop: "syzxygfl1",
    label: "上月正向有功尖电能",
    parm0: "readPositiveActiveEnergy",
    parm01: "writePositiveActiveEnergy",
    parm1: 1,
    parm2: 1,
    parm3: "",
    content: "",
  },
  {
    prop: "syzxygfl2",
    label: "上月正向有功峰电能",
    parm0: "readPositiveActiveEnergy",
    parm01: "writePositiveActiveEnergy",
    parm1: 2,
    parm2: 1,
    parm3: "",
    content: "",
  },
  {
    prop: "syzxygfl3",
    label: "上月正向有功平电能",
    parm0: "readPositiveActiveEnergy",
    parm01: "writePositiveActiveEnergy",
    parm1: 3,
    parm2: 1,
    parm3: "",
    content: "",
  },
  {
    prop: "syzxygfl4",
    label: "上月正向有功谷电能",
    parm0: "readPositiveActiveEnergy",
    parm01: "writePositiveActiveEnergy",
    parm1: 4,
    parm2: 1,
    parm3: "",
    content: "",
  },
  {
    prop: "syzxygfl5",
    label: "上月正向有功深谷电能",
    parm0: "readPositiveActiveEnergy",
    parm01: "writePositiveActiveEnergy",
    parm1: 5,
    parm2: 1,
    parm3: "",
    content: "",
  },
  {
    prop: "syzxygfl",
    label: "上月正向有功总电能",
    parm0: "readPositiveActiveEnergy",
    parm01: "writePositiveActiveEnergy",
    parm1: 0,
    parm2: 1,
    parm3: "",
    content: "",
    type: "1",
  },
  {
    prop: "syfxygfl1",
    label: "上月反向有功尖电能",
    parm0: "readReverseActiveEnergy",
    parm01: "writeReverseActiveEnergy",
    parm1: 1,
    parm2: 1,
    parm3: "",
    content: "",
  },
  {
    prop: "syfxygfl2",
    label: "上月反向有功峰电能",
    parm0: "readReverseActiveEnergy",
    parm01: "writeReverseActiveEnergy",
    parm1: 2,
    parm2: 1,
    parm3: "",
    content: "",
  },
  {
    prop: "syfxygfl3",
    label: "上月反向有功平电能",
    parm0: "readReverseActiveEnergy",
    parm01: "writeReverseActiveEnergy",
    parm1: 3,
    parm2: 1,
    parm3: "",
    content: "",
  },
  {
    prop: "syfxygfl4",
    label: "上月反向有功谷电能",
    parm0: "readReverseActiveEnergy",
    parm01: "writeReverseActiveEnergy",
    parm1: 4,
    parm2: 1,
    parm3: "",
    content: "",
  },
  {
    prop: "syfxygfl5",
    label: "上月反向有功深谷电能",
    parm0: "readReverseActiveEnergy",
    parm01: "writeReverseActiveEnergy",
    parm1: 5,
    parm2: 1,
    parm3: "",
    content: "",
  },
  {
    prop: "syfxygfl",
    label: "上月反向有功总电能",
    parm0: "readReverseActiveEnergy",
    parm01: "writeReverseActiveEnergy",
    parm1: 0,
    parm2: 1,
    parm3: "",
    content: "",
    type: "1",
  },
  {
    prop: "syzhwg1zdn",
    label: "上月组合无功1总电能",
    parm0: "readCombinedReactivePower1ElectricEnergy",
    parm01: "writeCombinedReactivePower1ElectricEnergy",
    parm1: 0,
    parm2: 1,
    parm3: "",
    content: "",
    type: "1",
  },
  {
    prop: "syzhwg2zdn",
    label: "上月组合无功2总电能",
    parm0: "readCombinedReactivePower2ElectricEnergy",
    parm01: "writeCombinedReactivePower2ElectricEnergy",
    parm1: 0,
    parm2: 1,
    parm3: "",
    content: "",
    type: "1",
  },
  {
    prop: "syd1xxwgzdn",
    label: "上月一象限无功总电能",
    parm0: "readFirstQuadrantReactiveEnergy",
    parm01: "writeFirstQuadrantReactiveEnergy",
    parm1: 0,
    parm2: 1,
    parm3: "",
    content: "",
    type: "1",
  },
  {
    prop: "syd2xxwgzdn",
    label: "上月二象限无功总电能",
    parm0: "readSecondQuadrantReactiveEnergy",
    parm01: "writeSecondQuadrantReactiveEnergy",
    parm1: 0,
    parm2: 1,
    parm3: "",
    content: "",
    type: "1",
  },
  {
    prop: "syd3xxwgzdn",
    label: "上月三象限无功总电能",
    parm0: "readThirdQuadrantReactiveEnergy",
    parm01: "writeThirdQuadrantReactiveEnergy",
    parm1: 0,
    parm2: 1,
    parm3: "",
    content: "",
    type: "1",
  },
  {
    prop: "syd4xxwgzdn",
    label: "上月四象限无功总电能",
    parm0: "readFourthQuadrantReactiveEnergy",
    parm01: "writeFourthQuadrantReactiveEnergy",
    parm1: 0,
    parm2: 1,
    parm3: "",
    content: "",
    type: "1",
  },
]);
const maxtableData = ref([
  {
    content: "",
    label: "(当前)正向有功总最大需量及发生时间",
    prop: "zxygzzdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm1: 0,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)正向有功费率1最大需量及发生时间",
    prop: "zxygfl1zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm1: 1,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)正向有功费率2最大需量及发生时间",
    prop: "zxygfl2zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm1: 2,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)正向有功费率3最大需量及发生时间",
    prop: "zxygfl3zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm1: 3,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)正向有功费率4最大需量及发生时间",
    prop: "zxygfl4zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm1: 4,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)正向有功费率5最大需量及发生时间",
    prop: "zxygfl5zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm1: 5,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)反向有功总最大需量及发生时间",
    prop: "fxygzzdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm1: 0,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)反向有功费率1最大需量及发生时间",
    prop: "fxygfl1zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm1: 1,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)反向有功费率2最大需量及发生时间",
    prop: "fxygfl2zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm1: 2,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)反向有功费率3最大需量及发生时间",
    prop: "fxygfl3zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm1: 3,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)反向有功费率4最大需量及发生时间",
    prop: "fxygfl4zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm1: 4,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)反向有功费率5最大需量及发生时间",
    prop: "fxygfl5zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm1: 5,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)组合无功1总最大需量及发生时间",
    prop: "zhwg1zzdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm1: 0,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)组合无功1费率1最大需量及发生时间",
    prop: "zhwg1fl1zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm1: 1,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)组合无功1费率2最大需量及发生时间",
    prop: "zhwg1fl2zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm1: 2,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)组合无功1费率3最大需量及发生时间",
    prop: "zhwg1fl3zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm1: 3,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)组合无功1费率4最大需量及发生时间",
    prop: "zhwg1fl4zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm1: 4,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)组合无功2总最大需量及发生时间",
    prop: "zhwg2zzdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm1: 0,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)组合无功2费率1最大需量及发生时间",
    prop: "zhwg2fl1zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm1: 1,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)组合无功2费率2最大需量及发生时间",
    prop: "zhwg2fl2zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm1: 2,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)组合无功2费率3最大需量及发生时间",
    prop: "zhwg2fl3zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm1: 3,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)组合无功2费率4最大需量及发生时间",
    prop: "zhwg2fl4zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm1: 4,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第一象限无功总最大需量及发生时间",
    prop: "d1xxwgzzdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm1: 0,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第一象限无功费率1最大需量及发生时间",
    prop: "d1xxwgfl1zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm1: 1,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第一象限无功费率2最大需量及发生时间",
    prop: "d1xxwgfl2zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm1: 2,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第一象限无功费率3最大需量及发生时间",
    prop: "d1xxwgfl3zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm1: 3,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第一象限无功费率4最大需量及发生时间",
    prop: "d1xxwgfl4zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm1: 4,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第二象限无功总最大需量及发生时间",
    prop: "d2xxwgzzdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm1: 0,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第二象限无功费率1最大需量及发生时间",
    prop: "d2xxwgfl1zdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm1: 1,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第二象限无功费率2最大需量及发生时间",
    prop: "d2xxwgfl2zdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm1: 2,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第二象限无功费率3最大需量及发生时间",
    prop: "d2xxwgfl3zdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm1: 3,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第二象限无功费率4最大需量及发生时间",
    prop: "d2xxwgfl4zdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm1: 4,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第三象限无功总最大需量及发生时间",
    prop: "d3xxwgzzdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm1: 0,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第三象限无功费率1最大需量及发生时间",
    prop: "d3xxwgfl1zdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm1: 1,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第三象限无功费率2最大需量及发生时间",
    prop: "d3xxwgfl2zdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm1: 2,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第三象限无功费率3最大需量及发生时间",
    prop: "d3xxwgfl3zdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm1: 3,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第三象限无功费率4最大需量及发生时间",
    prop: "d3xxwgfl4zdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm1: 4,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第四象限无功总最大需量及发生时间",
    prop: "d4xxwgzzdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm1: 0,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第四象限无功费率1最大需量及发生时间",
    prop: "d4xxwgfl1zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm1: 1,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第四象限无功费率2最大需量及发生时间",
    prop: "d4xxwgfl2zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm1: 2,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第四象限无功费率3最大需量及发生时间",
    prop: "d4xxwgfl3zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm1: 3,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(当前)当前第四象限无功费率4最大需量及发生时间",
    prop: "d4xxwgfl4zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm1: 4,
    parm2: 0,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)正向有功总最大需量及发生时间",
    prop: "syzxygzzdxljfssj",
    prop: "zxygzzdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm1: 0,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)正向有功费率1最大需量及发生时间",
    prop: "syzxygfl1zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm1: 1,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)正向有功费率2最大需量及发生时间",
    prop: "syzxygfl2zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm1: 2,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)正向有功费率3最大需量及发生时间",
    prop: "syzxygfl3zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm1: 3,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)正向有功费率4最大需量及发生时间",
    prop: "syzxygfl4zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm1: 4,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)正向有功费率5最大需量及发生时间",
    prop: "syzxygfl5zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfPositiveActivePower",
    parm1: 5,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)反向有功总最大需量及发生时间",
    prop: "syfxygzzdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm1: 0,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)反向有功费率1最大需量及发生时间",
    prop: "syfxygfl1zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm1: 1,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)反向有功费率2最大需量及发生时间",
    prop: "syfxygfl2zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm1: 2,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)反向有功费率3最大需量及发生时间",
    prop: "syfxygfl3zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm1: 3,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)反向有功费率4最大需量及发生时间",
    prop: "syfxygfl4zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm1: 4,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)反向有功费率5最大需量及发生时间",
    prop: "syfxygfl5zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfReverseActivePower",
    parm1: 5,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)组合无功1总最大需量及发生时间",
    prop: "syzhwg1zzdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm1: 0,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)组合无功1费率1最大需量及发生时间",
    prop: "syzhwg1fl1zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm1: 1,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)组合无功1费率2最大需量及发生时间",
    prop: "syzhwg1fl2zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm1: 2,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)组合无功1费率3最大需量及发生时间",
    prop: "syzhwg1fl3zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm1: 3,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)组合无功1费率4最大需量及发生时间",
    prop: "syzhwg1fl4zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower1",
    parm1: 4,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)组合无功2总最大需量及发生时间",
    prop: "syzhwg2zzdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm1: 0,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)组合无功2费率1最大需量及发生时间",
    prop: "syzhwg2fl1zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm1: 1,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)组合无功2费率2最大需量及发生时间",
    prop: "syzhwg2fl2zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm1: 2,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)组合无功2费率3最大需量及发生时间",
    prop: "syzhwg2fl3zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm1: 3,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)组合无功2费率4最大需量及发生时间",
    prop: "syzhwg2fl4zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm01: "writeMaximumDemandAndOccurrenceTimeOfCombinedReactivePower2",
    parm1: 4,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第一象限无功总最大需量及发生时间",
    prop: "syd1xxwgzzdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm1: 0,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第一象限无功费率1最大需量及发生时间",
    prop: "syd1xxwgfl1zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm1: 1,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第一象限无功费率2最大需量及发生时间",
    prop: "syd1xxwgfl2zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm1: 2,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第一象限无功费率3最大需量及发生时间",
    prop: "syd1xxwgfl3zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm1: 3,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第一象限无功费率4最大需量及发生时间",
    prop: "syd1xxwgfl4zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFirstQuadrantReactivePower",
    parm1: 4,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第二象限无功总最大需量及发生时间",
    prop: "syd2xxwgzzdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm1: 0,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第二象限无功费率1最大需量及发生时间",
    prop: "syd2xxwgfl1zdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm1: 1,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第二象限无功费率2最大需量及发生时间",
    prop: "syd2xxwgfl2zdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm1: 2,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第二象限无功费率3最大需量及发生时间",
    prop: "syd2xxwgfl3zdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm1: 3,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第二象限无功费率4最大需量及发生时间",
    prop: "syd2xxwgfl4zdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheSecondQuadrant",
    parm1: 4,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第三象限无功总最大需量及发生时间",
    prop: "syd3xxwgzzdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm1: 0,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第三象限无功费率1最大需量及发生时间",
    prop: "syd3xxwgfl1zdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm1: 1,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第三象限无功费率2最大需量及发生时间",
    prop: "syd3xxwgfl2zdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm1: 2,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第三象限无功费率3最大需量及发生时间",
    prop: "syd3xxwgfl3zdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm1: 3,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第三象限无功费率4最大需量及发生时间",
    prop: "syd3xxwgfl4zdxljfssj",
    parm0:
      "readMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfReactivePowerInTheThirdQuadrant",
    parm1: 4,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第四象限无功总最大需量及发生时间",
    prop: "syd4xxwgzzdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm1: 0,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第四象限无功费率1最大需量及发生时间",
    prop: "syd4xxwgfl1zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm1: 1,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第四象限无功费率2最大需量及发生时间",
    prop: "syd4xxwgfl2zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm1: 2,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第四象限无功费率3最大需量及发生时间",
    prop: "syd4xxwgfl3zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm1: 3,
    parm2: 1,
    parm3: "",
  },
  {
    content: "",
    label: "(上月)当前第四象限无功费率4最大需量及发生时间",
    prop: "syd4xxwgfl4zdxljfssj",
    parm0: "readMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm01:
      "writeMaximumDemandAndOccurrenceTimeOfTheFourthQuadrantReactivePower",
    parm1: 4,
    parm2: 1,
    parm3: "",
  },
]);
const vatableData = ref([
  {
    content: "",
    parm0: "readU",
    parm01: "writeU",
    parm1: "A",
    parm2: 0,
    parm3: "",
    label: "A相电压",
    prop: "axdy",
  },
  {
    content: "",
    parm0: "readU",
    parm01: "writeU",
    parm1: "B",
    parm2: 0,
    parm3: "",
    label: "B相电压",
    prop: "bxdy",
  },
  {
    content: "",
    parm0: "readU",
    parm01: "writeU",
    parm1: "C",
    parm2: 0,
    parm3: "",
    label: "C相电压",
    prop: "cxdy",
  },
  {
    content: "",
    parm0: "readI",
    parm01: "writeI",
    parm1: "A",
    parm2: 0,
    parm3: "",
    label: "A相电流",
    prop: "axdl",
  },
  {
    content: "",
    parm0: "readI",
    parm01: "writeI",
    parm1: "B",
    parm2: 0,
    parm3: "",
    label: "B相电流",
    prop: "bxdl",
  },
  {
    content: "",
    parm0: "readI",
    parm01: "writeI",
    parm1: "C",
    parm2: 0,
    parm3: "",
    label: "C相电流",
    prop: "cxdl",
  },
  {
    content: "",
    parm0: "readInstantaneousTotalApparentPower",
    parm01: "writeInstantaneousTotalApparentPower",
    parm1: "NONE",
    parm2: 0,
    parm3: "",
    label: "瞬时总有功功率",
    prop: "sszyggl",
  },
  {
    content: "",
    parm0: "readInstantaneousTotalApparentPower",
    parm01: "writeInstantaneousTotalApparentPower",
    parm1: "A",
    parm2: 0,
    parm3: "",
    label: "瞬时A相有功功率",
    prop: "ssaxyggl",
  },
  {
    content: "",
    parm0: "readInstantaneousTotalApparentPower",
    parm01: "writeInstantaneousTotalApparentPower",
    parm1: "B",
    parm2: 0,
    parm3: "",
    label: "瞬时B相有功功率",
    prop: "ssbxyggl",
  },
  {
    content: "",
    parm0: "readInstantaneousTotalApparentPower",
    parm01: "writeInstantaneousTotalApparentPower",
    parm1: "C",
    parm2: 0,
    parm3: "",
    label: "瞬时C相有功功率",
    prop: "sscxyggl",
  },
  {
    content: "",
    parm0: "readInstantaneousTotalActivePower",
    parm01: "writeInstantaneousTotalActivePower",
    parm1: "NONE",
    parm2: 0,
    parm3: "",
    label: "瞬时总无功功率",
    prop: "sszwggl",
  },
  {
    content: "",
    parm0: "readInstantaneousTotalActivePower",
    parm01: "writeInstantaneousTotalActivePower",
    parm1: "A",
    parm2: 0,
    parm3: "",
    label: "瞬时A相无功功率",
    prop: "ssaxwggl",
  },
  {
    content: "",
    parm0: "readInstantaneousTotalActivePower",
    parm01: "writeInstantaneousTotalActivePower",
    parm1: "B",
    parm2: 0,
    parm3: "",
    label: "瞬时B相无功功率",
    prop: "ssbxwggl",
  },
  {
    content: "",
    parm0: "readInstantaneousTotalActivePower",
    parm01: "writeInstantaneousTotalActivePower",
    parm1: "C",
    parm2: 0,
    parm3: "",
    label: "瞬时C相无功功率",
    prop: "sscxwggl",
  },
  {
    content: "",
    parm0: "readInstantaneousTotalReactivePower",
    parm01: "writeInstantaneousTotalReactivePower",
    parm1: "NONE",
    parm2: 0,
    parm3: "",
    label: "瞬时总视在功率",
    prop: "sszszgl",
  },
  {
    content: "",
    parm0: "readInstantaneousTotalReactivePower",
    parm01: "writeInstantaneousTotalReactivePower",
    parm1: "A",
    parm2: 0,
    parm3: "",
    label: "瞬时A相相视在功率",
    prop: "ssaxszgl",
  },
  {
    content: "",
    parm0: "readInstantaneousTotalReactivePower",
    parm01: "writeInstantaneousTotalReactivePower",
    parm1: "B",
    parm2: 0,
    parm3: "",
    label: "瞬时B相视在功率",
    prop: "ssbxszgl",
  },
  {
    content: "",
    parm0: "readInstantaneousTotalReactivePower",
    parm01: "writeInstantaneousTotalReactivePower",
    parm1: "C",
    parm2: 0,
    parm3: "",
    label: "瞬时C相视在功率",
    prop: "sscxszgl",
  },
  {
    content: "",
    parm0: "readPowerFactor",
    parm01: "writePowerFactor",
    parm1: "NONE",
    parm2: 0,
    parm3: "",
    label: "总功率因数",
    prop: "zglxs",
  },
  {
    content: "",
    parm0: "readPowerFactor",
    parm01: "writePowerFactor",
    parm1: "A",
    parm2: 0,
    parm3: "",
    label: "A相功率因数",
    prop: "axglxs",
  },
  {
    content: "",
    parm0: "readPowerFactor",
    parm01: "writePowerFactor",
    parm1: "B",
    parm2: 0,
    parm3: "",
    label: "B相功率因数",
    prop: "bxglxs",
  },
  {
    content: "",
    parm0: "readPowerFactor",
    parm01: "writePowerFactor",
    parm1: "C",
    parm2: 0,
    parm3: "",
    label: "C相功率因数",
    prop: "cxglxs",
  },
  {
    content: "",
    parm0: "readPhaseAngle",
    parm01: "writePhaseAngle",
    parm1: "A",
    parm2: 0,
    parm3: "",
    label: "A相相角",
    prop: "axxj",
  },
  {
    content: "",
    parm0: "readPhaseAngle",
    parm01: "writePhaseAngle",
    parm1: "B",
    parm2: 0,
    parm3: "",
    label: "B相相角",
    prop: "bxxj",
  },
  {
    content: "",
    parm0: "readPhaseAngle",
    parm01: "writePhaseAngle",
    parm1: "C",
    parm2: 0,
    parm3: "",
    label: "C相相角",
    prop: "cxxj",
  },
]);
const paramtableData = ref([
  {
    content: "",
    label: "日期",
    parm0: "readDateAndWeek",
    parm01: "writeDateAndWeek",
    parm1: "",
    parm2: "",
    prop: "rqjxq",
  },
  {
    content: "",
    label: "当前时间",
    parm0: "readTime",
    parm01: "writeTime",
    parm1: "",
    parm2: "",
    prop: "sj",
  },
  {
    content: "",
    label: "最大需量周期",
    parm0: "readMaximumDemandPeriod",
    parm01: "writeMaximumDemandPeriod",
    parm1: "",
    parm2: "",
    prop: "zdxlzq",
  },
  {
    content: "",
    label: "滑差时间",
    parm0: "readSlipTime",
    parm01: "writeSlipTime",
    parm1: "",
    parm2: "",
    prop: "hcsj",
  },
  // {
  //   content: "",
  //   label: "校表脉冲宽度",
  //   parm0: "readCalibrationPulseWidth",
  //   parm01: "writeCalibrationPulseWidth",
  //   parm1: "",
  //   parm2: "",
  //   prop: "jbmckd",
  // },
  {
    content: "",
    label: "通讯地址",
    parm0: "readMailingAddress",
    parm01: "writeMailingAddress",
    parm1: "",
    parm2: "",
    prop: "txdz",
  },
  {
    content: "",
    label: "表号",
    parm0: "readTableNo",
    parm01: "writeTableNo",
    parm1: "",
    parm2: "",
    prop: "bh",
  },
  {
    content: "",
    label: "电表有功常数",
    parm0: "readMeterActiveConstant",
    parm01: "writeMeterActiveConstant",
    parm1: "",
    parm2: "",
    prop: "dbygcs",
  },
  {
    content: "",
    label: "电表无功常数",
    parm0: "readReactiveConstantOfElectricMeter",
    parm01: "writeReactiveConstantOfElectricMeter",
    parm1: "",
    parm2: "",
    prop: "dbwgcs",
  },
]);
const checkAll = ref([]);
const tableData = ref([]);
const epitopeArr = ref([]);
const newData = ref();
const currentDataList = ref([]);
const percentage1 = ref(0);
const percentage2 = ref(0);
const percentage3 = ref(0);
const percentage4 = ref(0);
const percentageFlag1 = ref(false);
const percentageFlag2 = ref(false);
const percentageFlag3 = ref(false);
const percentageFlag4 = ref(false);
const isContinue = ref(false);
// const wheelData =
//   "当前总电量,当前尖,当前峰,当前平,当前谷,上1月总,上1月尖,上1月峰,上1月平,上1月谷,上2月总,上2月尖,上2月峰,上2月平,上2月谷,户号（低8位）,户号（高4位）,表号（低8位）,表号（高4位）,日期,时间,电压,电流,功率,功率因数,通信地址（低8位）,通信地址（高4位）,零序电流,电网频率,当前反向总电量,当前反向尖,当前反向峰,当前反向平,当前反向谷";

onMounted(() => {
  tempData.value = [];
  watch(activeName, (newValue, oldValue) => {
    newLoopData(organStructure.value[0].children);
  });
  watch(activeName1, (newValue, oldValue) => {
    if (newValue === "1") {
      isPassword();
    }
    newLoopData(organStructure.value[0].children);
  });
  //判断是否输入密码
  isPassword();
  // //匹配数据
  // const arr = wheelData.split(",");
  // let arrData = [];
  // for (let i = 0; i < arr.length; i++) {
  //   let id;
  //   if (!i) id = 1;
  //   else id = i + 1;
  //   let obj = {
  //     id,
  //     label: arr[i],
  //     value: "",
  //   };
  //   arrData.push(obj);
  // }
  // console.log("arrData", arrData);
});
const isPassword = async () => {
  try {
    ruleForm.pass = "";
    let res = await userSelectState();
    if (res.data === "1") {
      pwdVisible.value = true;
    }
  } catch (error) {
    console.log(error);
  }
};
const handleClosePwd = () => {};
const submitForm = (formEl) => {
  if (!formEl) return;
  formEl.validate(async (valid) => {
    if (valid) {
      let parm = {
        password: ruleForm.pass,
      };
      let res = await userCheckPassword(parm);
      if (!res.data) {
        ruleForm.oldPass = "";
        ElMessage({
          type: "warning",
          message: "密码不正确",
        });
      } else {
        pwdVisible.value = false;
        ElMessage({
          message: "密码成功",
          type: "success",
        });
      }
    } else {
      return false;
    }
  });
};

const resetForm = (formEl) => {
  if (!formEl) return;
  formEl.resetFields();
};
const cancelData = () => {
  isContinue.value = true;
};
const newLoopData = (dataTab = []) => {
  dataTab.forEach((item) => {
    item.newMeterModel = false;
    item.newMeterType = false;
    item.newWiringType = false;
    item.newVoltage = false;
    item.newCurrent = false;
    item.newPtRatio = false;
    item.newCtRatio = false;
    item.newInstallAddr = false;
    if (item.children != undefined && item.children.length > 0) {
      newLoopData(item.children);
    }
  });
};
//新建方案
const newScheme = () => {
  //组织结构数据
  organStructure.value = [
    {
      id: 1,
      pname: "系统设置",
      pid: 0,
      position: "",
      meterModel: "",
      meterType: "",
      wiringType: "",
      voltage: "",
      current: "",
      meterAddr: "",
      userAddr: "",
      ptRatio: "",
      ctRatio: "",
      installAddr: "",
      children: [],
    },
  ];
  //所有表位信息
  stationArea.value.forEach((item) => {
    item.state = 0;
    item.checked = false;
    item.disabled = false;
    item.name = "";
  });
  stationData.value = JSON.parse(JSON.stringify(stationArea.value));
  newStationArea.value = JSON.parse(JSON.stringify(stationArea.value));
  // stationArea.value = []; //选中表位
  tableFault.value = [];
  calculationData.value = [];
  tableHeader.value = [];
  currentPlanId.value = 0;
  tempData.value = [];
  tableStudent.value = [];
  receivedData.value = [];
};

//载入方案
const loadScheme = () => {
  stationData.value.forEach((item) => {
    item.state = 0;
    item.checked = false;
    item.disabled = false;
  });
  loadSchemeFormVisible.value = true;
  newStationArea.value = JSON.parse(JSON.stringify(stationData.value));
};
//另存方案
const saveScheme = () => {
  schemeFormVisible.value = true;
};
// 关闭弹窗
const close = () => {
  if (schemeFormVisible.value) {
    // loadSchemeForm.value.getList();
  }
  schemeFormVisible.value = false;
  loadSchemeFormVisible.value = false;
};
// 读取当前表地址
const readTabAddr = () => {
  let tempArr = [];
  let newTempArr = tempData.value; //loopData([tempData.value], tempArr);
  if (newTempArr && newTempArr.id != undefined) {
    let arr = [1, 2, 5, 6];
    if (!arr.includes(newTempArr.type)) {
      loading.value = true;
      let i = 0;
      let params = [];
      let parm = {
        pos: newTempArr.position,
        planId: currentPlanId.value,
      };
      params.push(parm);
      doMeterReadMeterAddr(params, i);
    } else {
      ElMessage({
        message: "请先选择当前表信息",
        type: "warning",
      });
    }
  } else {
    ElMessage({
      message: "请先选择当前表信息",
      type: "warning",
    });
  }
};
const doMeterReadMeterAddr = async (params, i, type) => {
  let parm = params[i];
  await meterReadMeterAddr(parm)
    .then((res) => {
      if (type === 1) {
        epitopeArr.value[i].meterAddr = res.data.data ? res.data.data : "";
      } else {
        tempData.value.meterAddr = res.data.data ? res.data.data : "";
      }
      if (++i < params.length) {
        doMeterReadMeterAddr(params, i, type); //循环调用
      }
    })
    .catch(() => {
      if (type === 1) {
        epitopeArr.value[i].meterAddr = "失败";
      } else {
        tempData.value.meterAddr = "失败";
      }
      if (++i < params.length) {
        doMeterReadMeterAddr(params, i, type); //循环调用
      }
    });
  if (i === params.length) {
    loading.value = false;
  }
};
const meterReadMeterAddrApi = async (parm) => {};
const loopData = (dataTab = [], tempArr, type) => {
  let arr = [3, 4, 7, 8];
  if (type === 1) arr = [2, 3, 4, 6, 7, 8];
  dataTab.forEach((item) => {
    if (arr.includes(item.type)) {
      tempArr.push(item);
    }
    if (item.children != undefined && item.children.length > 0) {
      loopData(item.children, tempArr, type);
    }
  });
  return tempArr;
};
// 读取全部表地址
const readAllTabAddr = () => {
  let tempArr = [];
  let newTempArr = loopData(organStructure.value, tempArr);
  epitopeArr.value = newTempArr;
  let num = newTempArr.length;
  if (num > 0) {
    loading.value = true;
    let i = 0;
    let params = [];
    newTempArr.forEach((item) => {
      let parm = {
        pos: item.position,
        planId: currentPlanId.value,
      };
      params.push(parm);
    });
    doMeterReadMeterAddr(params, i, 1);
  } else {
    ElMessage({
      message: "请先选择当前发送表信息",
      type: "warning",
    });
  }
};
// 保存当前数据
const saveCurrentData = async () => {
  if (currentPlanId.value) {
    let parm = {
      id: currentPlanId.value,
      isActive: 1,
      meterPositionList: organStructure.value[0].children,
    };
    await meterPositionPlanUpdate(parm)
      .then((res) => {
        ElMessage({
          type: "success",
          message: "保存成功",
        });
        nextTick(() => {
          getPlanList(currentPlanId.value);
        });
      })
      .catch(() => {
        ElMessage({
          type: "warning",
          message: "保存失败",
        });
        loading.value = false;
      });
  } else {
    ElMessage({
      message: "请先选择方案",
      type: "warning",
    });
  }
};
const handle = async (planId) => {
  let parm = {};
  parm = {
    planId,
  };
  monthMeterReading.value = [];
  receivedData.value = [];
  calculationData.value = [];
  currentAccountingData.value = [];
  await meterPositionListTree(parm)
    .then((res) => {
      stationArea.value = JSON.parse(JSON.stringify(stationData.value));
      organStructure.value[0].children = JSON.parse(JSON.stringify(res.data));
      // console.log("organStructure.value", res.data, organStructure.value);
      matchedTableData(res.data); //匹配树状结构数据
      matchedTableHeader(); //匹配树状结构数据头部信息
    })
    .catch(() => {});
};
const matchedTableData = (data) => {
  tableStudent.value = [];
  data.forEach((item) => {
    currentDataList.value.forEach((item1) => {
      if (item.id === item1.id) {
        item.children = item1.children;
      }
    });
    if (item.type === 1 || item.type === 5) {
      let flag = false;
      item.children.forEach((item1) => {
        if (item1.type === 7) {
          flag = true;
        }
        if (item1.type === 3) {
          flag = true;
        }
      });
      if (flag) {
        tableStudent.value.push(item);
      }
    }
    if (item.type === 8) {
      tableStudent.value.push(item);
    }
  });
  tableFault.value = JSON.parse(JSON.stringify(data));
  // console.log("tableFault.value", tableFault);
  //tableStudent.value = JSON.parse(JSON.stringify(tableFault.value));
};
//匹配表格头部信息
const matchedTableHeader = () => {
  let arr = [3, 4, 7, 8];
  tableHeader.value = [];
  newData.value.forEach((item) => {
    if (arr.includes(item.type)) {
      tableHeader.value.push(item); //动态追加组织树状结构 表格头部
    }
  });
};
//根据方案id获取数据列表
const getPlanList = async (planId) => {
  let parm = {
    planId,
  };
  await meterPositionList(parm)
    .then((res) => {
      newData.value = res.data;
      matchedData(res.data);
      matchedMenuChild(res.data);
      nextTick(() => {
        handle(planId);
      });
    })
    .catch(() => {});
};
//匹配显示数据
const matchedData = (data) => {
  stationData.value.forEach((item) => {
    item.state = 0;
    item.name = "";
    item.pname = "";
    item.checked = false;
    item.disabled = false;
    data.forEach((item1) => {
      if (item1.position === Number(item.value)) {
        item.state = 1;
        item.name = item1.name;
        item.pname = item1.pname;
        item.checked = true;
        item.disabled = true;
      }
    });
  });
  newStationArea.value = JSON.parse(JSON.stringify(stationData.value));
  // console.log(stationData.value);
};
//匹配台区数据 子菜单追加
const matchedMenuChild = (data) => {
  currentDataList.value = data.filter((item) => item.type === 1);
  currentDataList.value.forEach((item) => {
    item.children = [];
    data.forEach((item1) => {
      if (item1.type != 4 && item.id === item1.pid) {
        item.children.push(item1);
      }
      if (item1.type == 4 && item.pname === item1.pname) {
        item.children.push(item1);
      }
    });
  });
};
// 发送所有表位
const sendAllTabs = () => {
  let tempArr = [];
  let newTempArr = loopData(organStructure.value, tempArr, 1);
  let num = newTempArr.length;
  if (num > 0) {
    loading.value = true;
    let i = 0;
    let params1 = [];
    let params2 = [];
    newTempArr.forEach((item) => {
      let commLcdParm = {
        addr: item.meterAddr,
        ctbb: item.ctRatio,
        ptbb: item.ptRatio,
        pos: item.position,
      };
      let commSendVoltageParm = {
        voltage: item.voltage,
        pos: item.position,
      };
      params1.push(commLcdParm);
      params2.push(commSendVoltageParm);
    });
    commLcdApi(params1, i, params2);
    if (i === num) {
      loading.value = false;
      ElMessage({
        type: "success",
        message: "发送成功",
      });
    }
  } else {
    ElMessage({
      message: "请先选择当前发送表信息",
      type: "warning",
    });
  }
};
// 发送当前表位
const sendTabs = () => {
  let tempArr = [];
  let newTempArr = tempData.value; //loopData([tempData.value], tempArr, 1);
  // console.log(newTempArr);
  if (newTempArr && newTempArr.id != undefined) {
    loading.value = true;
    let i = 0;
    let params1 = [];
    let params2 = [];
    let commLcdParm = {
      addr: newTempArr.meterAddr,
      ctbb: newTempArr.ctRatio,
      ptbb: newTempArr.ptRatio,
      pos: newTempArr.position,
    };
    let commSendVoltageParm = {
      voltage: newTempArr.voltage,
      pos: newTempArr.position,
    };
    params1.push(commLcdParm);
    params2.push(commSendVoltageParm);
    commLcdApi(params1, i, params2, 1);
  } else {
    ElMessage({
      message: "请先选择当前发送表信息",
      type: "warning",
    });
  }
};
//液晶显示屏接口
const commLcdApi = async (params, i, params2, type) => {
  let parm = params[i];
  await commLcd(parm)
    .then((res) => {
      if (++i < params.length) {
        commLcdApi(params, i, params2, type); //循环调用
      }
    })
    .catch(() => {
      ElMessage({
        type: "warning",
        message: "发送失败",
      });
      loading.value = false;
    });
  if (i === params.length) {
    commSendVoltageApi(params2, 0, type); //设置电压
  }
};
//表状态是否挂表
const commSendMeterStateApi = async (params, i, type) => {
  let commSendMeterStateParm = {};
  if (type === 1) {
    params.length = 1;
    let parm = tempData.value;
    commSendMeterStateParm = {
      meterState: 0,
      pos: Number(parm.position),
    };
  } else {
    let parm = params[i];
    commSendMeterStateParm = {
      meterState: parm.state ? 0 : 1,
      pos: Number(parm.value),
    };
  }
  await commSendMeterState(commSendMeterStateParm)
    .then((res) => {
      // console.log(res);
      if (++i < params.length) {
        commSendMeterStateApi(params, i); //循环调用
      }
    })
    .catch(() => {
      ElMessage({
        type: "warning",
        message: "发送失败",
      });
      loading.value = false;
    });
  if (i === params.length) {
    loading.value = false;
    ElMessage({
      type: "success",
      message: "发送成功",
    });
  }
};
const doCommSendMeterState = async (parm) => {};
//设置电压
const commSendVoltageApi = async (params, i, type) => {
  let parm = params[i];
  await commSendVoltage(parm)
    .then((res) => {
      // console.log(res);
      if (++i < params.length) {
        commSendVoltageApi(params, i, type); //循环调用
      }
    })
    .catch(() => {
      ElMessage({
        type: "warning",
        message: "发送失败",
      });
      loading.value = false;
    });
  if (i === params.length) {
    let params1 = JSON.parse(JSON.stringify(stationArea.value));
    commSendMeterStateApi(params1, 0, type); //是否挂表
  }
};
// 抄读表数据-读取表信息
const readTabData = () => {
  let targetChinese = "无功";
  const regexPattern = new RegExp(
    targetChinese
      .split("")
      .map((char) => "\\u" + char.charCodeAt(0).toString(16))
      .join(""),
    "gu"
  );
  checkAll.value = [];
  if (currentActiveName.value === "1") {
    percentage1.value = 0;
    tableData.value = etableData.value;
  }
  if (currentActiveName.value === "2") {
    percentage2.value = 0;
    tableData.value = maxtableData.value;
  }
  if (currentActiveName.value === "3") {
    percentage3.value = 0;
    tableData.value = vatableData.value;
  }
  if (currentActiveName.value === "4") {
    percentage4.value = 0;
    tableData.value = paramtableData.value;
  }
  if (readRadio.value === "3" || readRadio.value === "4") {
    let parm = [];
    tableHeader.value.forEach((item) => {
      tableData.value.forEach((item1) => {
        const matches = item1.label.match(regexPattern);
        let num = 0;
        let num1 = 0;
        if (matches) num = matches.length;
        if (currentActiveName.value === "1") {
          if (
            item.wiringType != "单相" ||
            (item.wiringType === "单相" && !num)
          ) {
            let obj = readSplicingParameters(item1, item.position);
            parm.push(obj);
          }
        } else {
          let obj = readSplicingParameters(item1, item.position);
          parm.push(obj);
        }
      });
    });
    meterMeterDataCollectionApi(parm, 0, 1);
  } else {
    if (
      multipleSelection.value != undefined ||
      position.value != undefined ||
      cellData.value != undefined
    ) {
      if (
        (multipleSelection.value != undefined
          ? multipleSelection.value.length > 0
          : "") ||
        position.value ||
        cellData.value
      ) {
        switch (readRadio.value) {
          case "1":
            //选中列
            if (position.value) {
              let newFlag = loopDataPosition(
                organStructure.value[0].children,
                position.value,
                [],
                1
              );
              let parm = [];
              // 是否有多选
              if (multipleSelection.value.length > 0) {
                multipleSelection.value.forEach((item1) => {
                  const matches = item1.label.match(regexPattern);
                  let num = 0;
                  if (matches) num = matches.length;
                  if (currentActiveName.value === "1") {
                    if (!newFlag || (newFlag && !num)) {
                      let obg = readSplicingParameters(item1, position.value);
                      parm.push(obj);
                    } else {
                      item1["value" + position.value] = "无数据";
                    }
                  } else {
                    let obj = readSplicingParameters(item1, position.value);
                    parm.push(obj);
                  }
                });
                // console.log("pppp", parm, multipleSelection.value);
              } else {
                tableData.value.forEach((item1) => {
                  const matches = item1.label.match(regexPattern);
                  let num = 0;
                  if (matches) num = matches.length;
                  if (currentActiveName.value === "1") {
                    if (!newFlag || (newFlag && !num)) {
                      let obj = readSplicingParameters(item1, position.value);
                      parm.push(obj);
                    }
                  } else {
                    let obj = readSplicingParameters(item1, position.value);
                    parm.push(obj);
                  }
                });
              }
              meterMeterDataCollectionApi(parm, 0, 1); //接口调用
            }
            //选中行
            else if (multipleSelection.value.length > 0) {
              let tempArr = tableHeader.value;
              let parm = [];
              tempArr.forEach((item) => {
                multipleSelection.value.forEach((item1) => {
                  const matches = item1.label.match(regexPattern);
                  let num = 0;
                  if (matches) num = matches.length;
                  if (currentActiveName.value === "1") {
                    if (
                      item.wiringType != "单相" ||
                      (item.wiringType === "单相" && !num)
                    ) {
                      let obj = readSplicingParameters(item1, item.position);
                      parm.push(obj);
                    } else {
                      item1["value" + item.position] = "无数据";
                    }
                  } else {
                    let obj = readSplicingParameters(item1, item.position);
                    parm.push(obj);
                  }
                });
              });
              meterMeterDataCollectionApi(parm, 0, 1); //接口调用
            }
            //选中表格 cellData
            else if (cellData.value) {
              let newFlag = loopDataPosition(
                organStructure.value[0].children,
                cellData.value.meterPositionId,
                [],
                1
              );
              const matches = cellData.value.row.label.match(regexPattern);

              let num = 0;
              if (matches) num = matches.length;
              if (currentActiveName.value === "1") {
                if (!newFlag || (newFlag && !num)) {
                  let parm = readSplicingParameters(
                    cellData.value.row,
                    cellData.value.meterPositionId
                  );
                  meterMeterDataCollectionApi([parm], 0, 1); //接口调用
                }
              } else {
                let parm = readSplicingParameters(
                  cellData.value.row,
                  cellData.value.meterPositionId
                );
                meterMeterDataCollectionApi([parm], 0, 1); //接口调用
              }
            }
            break;
          case "2":
            if (!position.value) {
              ElMessage({
                message: "请先选择当前表信息",
                type: "warning",
              });
            } else {
              let parm = [];
              let newFlag = loopDataPosition(
                organStructure.value[0].children,
                position.value,
                [],
                1
              );
              tableData.value.forEach((item1) => {
                const matches = item1.label.match(regexPattern);
                let num = 0;
                if (matches) num = matches.length;
                if (currentActiveName.value === "1") {
                  if (!newFlag || (newFlag && !num)) {
                    let obj = readSplicingParameters(item1, position.value);
                    parm.push(obj);
                  }
                } else {
                  let obj = readSplicingParameters(item1, position.value);
                  parm.push(obj);
                }
              });
              // console.log(parm);
              meterMeterDataCollectionApi(parm, 0, 1);
            }
            break;
          case "4":
            break;
          default:
            break;
        }
      } else {
        ElMessage({
          message: "请先选择当前读取表信息",
          type: "warning",
        });
      }
    } else {
      ElMessage({
        message: "请先选择当前读取表信息",
        type: "warning",
      });
    }
  }
};
// 抄读表数据-写入表信息
const writeTabData = () => {
  if (currentActiveName.value === "1") {
    percentage1.value = 0;
    tableData.value = etableData.value;
  }
  if (currentActiveName.value === "2") {
    percentage2.value = 0;
    tableData.value = maxtableData.value;
  }
  if (currentActiveName.value === "3") {
    percentage3.value = 0;
    tableData.value = vatableData.value;
  }
  if (currentActiveName.value === "4") {
    percentage4.value = 0;
    tableData.value = paramtableData.value;
  }
  // if (currentActiveName.value === "1") tableData.value = etableData.value;
  // if (currentActiveName.value === "2") tableData.value = maxtableData.value;
  // if (currentActiveName.value === "3") tableData.value = vatableData.value;
  // if (currentActiveName.value === "4") tableData.value = paramtableData.value;
  let targetChinese = "无功";
  let targetChinese1 = "总电能";
  const regexPattern = new RegExp(
    targetChinese
      .split("")
      .map((char) => "\\u" + char.charCodeAt(0).toString(16))
      .join(""),
    "gu"
  );
  const regexPattern1 = new RegExp(
    targetChinese1
      .split("")
      .map((char) => "\\u" + char.charCodeAt(0).toString(16))
      .join(""),
    "gu"
  );
  if (writeRadio.value === "3") {
    let parm = [];
    tableHeader.value.forEach((item) => {
      tableData.value.forEach((item1) => {
        const matches = item1.label.match(regexPattern);
        const matches1 = item1.label.match(regexPattern1);
        let num = 0;
        let num1 = 0;
        if (matches) num = matches.length;
        if (matches1) num1 = matches1.length;
        if (currentActiveName.value === "1") {
          if (!num1) {
            if (
              item.wiringType != "单相" ||
              (item.wiringType === "单相" && !num)
            ) {
              if (!disabledArr.includes(item1.prop)) {
                let obj = writeSplicingParameters(item1, item.position);
                parm.push(obj);
              }
            }
          }
        } else {
          if (!disabledArr.includes(item1.prop)) {
            let obj = writeSplicingParameters(item1, item.position);
            parm.push(obj);
          }
        }
      });
    });
    // console.log(parm);
    meterMeterDataCollectionApi(parm, 0, 2);
  } else {
    if (
      multipleSelection.value.length > 0 ||
      position.value ||
      cellData.value
    ) {
      switch (writeRadio.value) {
        case "1":
          //选中列
          if (position.value) {
            let newFlag = loopDataPosition(
              organStructure.value[0].children,
              position.value,
              []
            );
            // 是否有多选
            let parm = [];
            if (multipleSelection.value.length > 0) {
              multipleSelection.value.forEach((item1) => {
                const matches = item1.label.match(regexPattern);
                const matches1 = item1.label.match(regexPattern1);
                let num = 0;
                let num1 = 0;
                if (matches) num = matches.length;
                if (matches1) num1 = matches1.length;
                if (currentActiveName.value === "1") {
                  if (!num1) {
                    if (!newFlag || (newFlag && !num)) {
                      if (!disabledArr.includes(item1.prop)) {
                        let obj = writeSplicingParameters(
                          item1,
                          position.value
                        );
                        parm.push(obj);
                      }
                    }
                  }
                } else {
                  if (!disabledArr.includes(item1.prop)) {
                    let obj = writeSplicingParameters(item1, position.value);
                    parm.push(obj);
                  }
                }
              });
            } else {
              tableData.value.forEach((item1) => {
                const matches = item1.label.match(regexPattern);
                const matches1 = item1.label.match(regexPattern1);
                let num = 0;
                let num1 = 0;
                if (matches) num = matches.length;
                if (matches1) num1 = matches1.length;
                if (currentActiveName.value === "1") {
                  if (!num1) {
                    if (!newFlag || (newFlag && !num)) {
                      if (!disabledArr.includes(item1.prop)) {
                        let obj = writeSplicingParameters(
                          item1,
                          position.value
                        );
                        parm.push(obj);
                      }
                    }
                  }
                } else {
                  if (!disabledArr.includes(item1.prop)) {
                    let obj = writeSplicingParameters(item1, position.value);
                    parm.push(obj);
                  }
                }
              });
            }
            if (parm.length > 0) {
              meterMeterDataCollectionApi(parm, 0, 2);
            }
          }
          //选中行
          else if (multipleSelection.value.length > 0) {
            let tempArr = tableHeader.value;
            let parm = [];
            tempArr.forEach((item) => {
              multipleSelection.value.forEach((item1) => {
                const matches = item1.label.match(regexPattern);
                const matches1 = item1.label.match(regexPattern1);
                let num = 0;
                let num1 = 0;
                if (matches) num = matches.length;
                if (matches1) num1 = matches1.length;
                if (currentActiveName.value === "1") {
                  if (!num1) {
                    if (
                      item.wiringType != "单相" ||
                      (item.wiringType === "单相" && !num)
                    ) {
                      if (!disabledArr.includes(item1.prop)) {
                        let obj = writeSplicingParameters(item1, item.position);
                        parm.push(obj);
                      }
                    }
                  }
                } else {
                  if (!disabledArr.includes(item1.prop)) {
                    let obj = writeSplicingParameters(item1, item.position);
                    parm.push(obj);
                  }
                }
              });
            });
            if (parm.length > 0) {
              meterMeterDataCollectionApi(parm, 0, 2);
            }
          }
          //选中表格 cellData
          else if (cellData.value) {
            let newFlag = loopDataPosition(
              organStructure.value[0].children,
              cellData.value.meterPositionId,
              []
            );
            const matches = cellData.value.row.label.match(regexPattern);
            const matches1 = cellData.value.row.label.match(regexPattern1);
            let num = 0;
            let num1 = 0;
            if (matches) num = matches.length;
            if (matches1) num1 = matches1.length;
            if (currentActiveName.value === "1") {
              if (!num1) {
                if (!newFlag || (newFlag && !num)) {
                  if (!disabledArr.includes(cellData.value.row.prop)) {
                    let parm = writeSplicingParameters(
                      cellData.value.row,
                      cellData.value.meterPositionId
                    );
                    meterMeterDataCollectionApi([parm], 0, 2);
                  }
                }
              }
            } else {
              if (!disabledArr.includes(cellData.value.row.prop)) {
                let parm = writeSplicingParameters(
                  cellData.value.row,
                  cellData.value.meterPositionId
                );
                meterMeterDataCollectionApi([parm], 0, 2);
              }
            }
          }
          break;
        case "2":
          let i2 = 0;
          if (!position.value) {
            ElMessage({
              message: "请先选择当前表信息",
              type: "warning",
            });
          } else {
            let parm = [];
            let newFlag = loopDataPosition(
              organStructure.value[0].children,
              position.value,
              []
            );
            tableData.value.forEach((item1) => {
              const matches = item1.label.match(regexPattern);
              const matches1 = item1.label.match(regexPattern1);
              let num = 0;
              let num1 = 0;
              if (matches) num = matches.length;
              if (matches1) num1 = matches1.length;
              if (currentActiveName.value === "1") {
                if (!num1) {
                  if (!newFlag || (newFlag && !num)) {
                    if (!disabledArr.includes(item1.prop)) {
                      let obj = writeSplicingParameters(item1, position.value);
                      parm.push(obj);
                    }
                  }
                }
              } else {
                if (!disabledArr.includes(item1.prop)) {
                  let obj = writeSplicingParameters(item1, position.value);
                  parm.push(obj);
                }
              }
            });
            if (parm.length > 0) {
              meterMeterDataCollectionApi(parm, 0, 2);
            }
          }
          break;
        case "4":
          break;
          type;
        default:
          break;
      }
    } else {
      ElMessage({
        message: "请先选择当前写入表信息",
        type: "warning",
      });
    }
  }
};
const loopDataPosition = (dataTab = [], pos, tempArr = [], type) => {
  dataTab.forEach((item) => {
    if (item.position === Number(pos)) {
      if (item.wiringType === "单相") {
        tempArr.push(true);
      } else {
        tempArr.push(false);
      }
    } else {
      tempArr.push(false);
    }
    if (item.children != undefined && item.children.length > 0) {
      loopDataPosition(item.children, pos, tempArr, type);
    }
  });
  return tempArr.includes(true);
};
const meterMeterDataCollectionApi = async (params1, i, type) => {
  loadingRef.value = true;
  if (isContinue.value) {
    loadingRef.value = false;
    isContinue.value = false;
  } else {
    if (currentActiveName.value === "1") {
      percentageFlag1.value = true;
    }
    if (currentActiveName.value === "2") {
      percentageFlag2.value = true;
    }
    if (currentActiveName.value === "3") {
      percentageFlag3.value = true;
    }
    if (currentActiveName.value === "4") {
      percentageFlag4.value = true;
    }
    let parm = JSON.parse(JSON.stringify(params1[i]));
    await meterMeterDataCollection(parm)
      .then((res) => {
        if (type === 1) getParseData(parm, res.data.data, i); //匹配数据赋值
        if (++i < params1.length) {
          meterMeterDataCollectionApi(params1, i, type); //循环调用
        }
        getProcess(i, type); //进度条
      })
      .catch(() => {
        if (type === 1) getParseData(parm, "失败", i); //匹配数据赋值
        if (++i < params1.length) {
          meterMeterDataCollectionApi(params1, i, type); //循环调用
        }
        getProcess(i, type); //进度条
      });
    if (i == params1.length) {
      loadingRef.value = false;
      let msg;
      if (type === 1) msg = "读取成功";
      if (type === 2) msg = "写入成功";
      else msg = "发送成功";
      ElMessage({
        type: "success",
        message: msg,
      });
    }
  }
};

const getParseData = (data, result, i) => {
  let targetChinese = "无功";
  const regexPattern = new RegExp(
    targetChinese
      .split("")
      .map((char) => "\\u" + char.charCodeAt(0).toString(16))
      .join(""),
    "gu"
  );
  tableData.value.forEach((item) => {
    const matches = item.label.match(regexPattern);
    let num = 0;
    //是否无功
    if (matches) num = matches.length;
    //是否单相
    let newFlag = loopDataPosition(
      organStructure.value[0].children,
      data.pos,
      [],
      1
    );
    if (currentActiveName.value == "1") {
      if (multipleSelection.value.length) {
        if (newFlag && num && multipleSelection.value.includes(item.label)) {
          item["value" + data.pos] = "无数据";
          wgCount.value++;
        }
      } else {
        if (newFlag && num) {
          item["value" + data.pos] = "无数据";
          wgCount.value++;
        }
      }
    }
    if (checkAll.value.includes(item.prop)) {
      //1.确定methodName
      if (item.parm0 === data.methodName) {
        if (currentActiveName.value == "3") {
          if (item.parm1 === data.parm[0]) {
            item["value" + data.pos] = result;
          }
        } else if (currentActiveName.value == "4") {
          item["value" + data.pos] = result;
        } else {
          //2.确定上月还是本月
          if (item.parm2 === data.parm[1]) {
            //3.确定尖峰平谷总
            if (item.parm1 === data.parm[0]) {
              item["value" + data.pos] = result;
            }
          }
        }
      }
    }
  });
  // getProcess(i, 1); //进度条
};
const getProcess = (i, type) => {
  let caseVal = readRadio.value;
  let count = 0;
  if (type === 2) {
    caseVal = writeRadio.value;
  }
  let total;
  let percentage;
  if (caseVal === "3" || caseVal === "4") {
    tableHeader.value.forEach((item) => {
      if (item.wiringType === "单相" && currentActiveName.value === "1") {
        count += 12; //读取
      }
    });
    if (type === 2 && currentActiveName.value === "1")
      count = tableHeader.value.length * 17;
    total = tableHeader.value.length * tableData.value.length - count;

    percentage = Math.ceil((i / total) * 100).toFixed(2);
    changePercentageData(percentage);
  } else if (caseVal === "1") {
    if (position.value) {
      tableHeader.value.forEach((item) => {
        if (
          item.wiringType === "单相" &&
          Number(position.value) === item.position &&
          currentActiveName.value === "1"
        ) {
          count = 12; //读取
        }
      });
      if (type === 2 && currentActiveName.value === "1") count = 17;
      if (multipleSelection.value.length > 0) {
        percentage = "100";
        changePercentageData(percentage);
      } else {
        total = tableData.value.length - count;

        percentage = Math.ceil((i / total) * 100).toFixed(2);
        changePercentageData(percentage);
      }
    } else if (multipleSelection.value.length > 0) {
      if (type === 2 && currentActiveName.value === "1") {
        let targetChinese = "总电能";
        const regexPattern = new RegExp(
          targetChinese
            .split("")
            .map((char) => "\\u" + char.charCodeAt(0).toString(16))
            .join(""),
          "gu"
        );
        multipleSelection.value.forEach((item) => {
          const matches = item.label.match(regexPattern);
          let num = 0;
          if (matches) num = matches.length;
          if (num) {
            count += 1;
          }
        });
        count = count * tableHeader.value.length;
      } else {
        let flag1 = false;
        tableHeader.value.forEach((item) => {
          if (item.wiringType === "单相" && currentActiveName.value === "1") {
            flag1 = true;
          }
        });
        let targetChinese = "无功";
        const regexPattern = new RegExp(
          targetChinese
            .split("")
            .map((char) => "\\u" + char.charCodeAt(0).toString(16))
            .join(""),
          "gu"
        );
        multipleSelection.value.forEach((item) => {
          const matches = item.label.match(regexPattern);
          let num = 0;
          if (matches) num = matches.length;
          if (num && flag1) {
            count += 1;
          }
        });
      }
      total = tableHeader.value.length * multipleSelection.value.length - count;
      percentage = Math.ceil((i / total) * 100).toFixed(2);
      changePercentageData(percentage);
    } else if (cellData.value) {
      percentage = "100";
      changePercentageData(percentage);
    }
  } else if (caseVal === "2") {
    tableHeader.value.forEach((item) => {
      if (
        item.wiringType === "单相" &&
        Number(position.value) === item.position &&
        currentActiveName.value === "1"
      ) {
        count = 12; //读取
      }
    });
    if (type === 2 && currentActiveName.value === "1") count = 17; //写入
    total = tableData.value.length - count;
    percentage = Math.ceil((i / total) * 100).toFixed(2);
    changePercentageData(percentage);
  }
  // console.log(caseVal, percentage, total, i);
};
const changePercentageData = (percentage) => {
  if (Number(percentage) > 100) percentage = 100;
  if (currentActiveName.value === "1") {
    percentage1.value = Number(percentage);
    etableData.value = tableData.value;
  }
  if (currentActiveName.value === "2") {
    percentage2.value = Number(percentage);
    maxtableData.value = tableData.value;
  }
  if (currentActiveName.value === "3") {
    percentage3.value = Number(percentage);
    vatableData.value = tableData.value;
  }
  if (currentActiveName.value === "4") {
    percentage4.value = Number(percentage);
    paramtableData.value = tableData.value;
  }
};
const selectData = (parm1, parm2, parm3, val) => {
  multipleSelection.value = parm1; //table里的多选框数据
  cellData.value = parm2; //table里的单元格数据
  position.value = parm3; //table里的每一列的数据
  currentActiveName.value = val; //table对应的tab 类型
};
//读取组合参数 发送命令
const readSplicingParameters = (item1, pos) => {
  let newParm = [item1.parm1, item1.parm2];
  if (currentActiveName.value == "3") newParm = [item1.parm1];
  if (currentActiveName.value == "4") newParm = [];
  let obj = {
    pos,
    parm: newParm,
    methodName: item1.parm0,
    planId: currentPlanId.value,
  };
  checkAll.value.push(item1.prop);
  return obj;
};
//写入组合参数 发送命令
const writeSplicingParameters = (item1, pos) => {
  let parm3 = item1["value" + pos];
  if (parm3 === undefined || !parm3) parm3 = "";
  let newParm = [item1.parm1, item1.parm2, parm3];
  if (currentActiveName.value == "3") newParm = [item1.parm1, parm3];
  if (currentActiveName.value == "4") newParm = [parm3];
  let obj = {
    pos,
    parm: newParm,
    methodName: item1.parm01,
    planId: currentPlanId.value,
  };
  return obj;
};
</script>

<style lang="scss" scoped>
@import "./index.scss";
.rmd-content {
  display: flex;
  .rmd-item1 {
    flex: 1;
  }
  .rmd-item2 {
    width: 185px;
    padding: 10px;
    .rmd-item2-1 {
      display: flex;
      flex-direction: column;
      align-items: center;
      .el-button {
        width: 120px;
        margin: 10px 0px;
      }
      .rmd-item2-11 {
        display: flex;
        flex-direction: column;
        padding: 10px;
      }
    }
  }
}
</style>
<style lang="scss">
.demo-progress {
  margin: -10px 0px 3px 0px;
}
.el-progress-bar__outer {
  width: 100% !important;
}
</style>
